From: Jim Blandy Date: Mon, 21 Jun 1993 00:51:36 +0000 (+0000) Subject: * add-log.el (add-log-current-defun): To find the name of the X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95207 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0e93321957108870f7e9d41c24425e88353f8b9e;p=emacs.git * add-log.el (add-log-current-defun): To find the name of the function being defined in emacs-lisp-mode, lisp-mode, and scheme-mode, skip an opening paren and an s-expression, instead of just one word. This allows us to properly recognize things like define-key and define-macro. --- diff --git a/lisp/add-log.el b/lisp/add-log.el index d121a76cdf6..6c468a919ec 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -267,7 +267,9 @@ Has a preference of looking backwards." (progn (forward-sexp -1) (>= location (point)))) (progn - (forward-word 1) + (if (looking-at "\\s(") + (forward-char 1)) + (forward-sexp 1) (skip-chars-forward " ") (buffer-substring (point) (progn (forward-sexp 1) (point))))))